package miage.rest.model;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import miage.rest.xml.xstream.converter.annotations.HrefVariable;
import java.util.List;
import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author Lou , marya
 */
@XStreamAlias("session")
public class SessionDiplome implements Serializable {
    private static final long serialVersionUID = 1L;


    @XStreamAlias("id")
    @XStreamAsAttribute
    @HrefVariable
    private Integer idSession;
    
    private Integer idVersionDiplome;
    private String idFormation;

    @XStreamAlias("nom")
    private String nom;

    @XStreamAlias("debut")
    private Date dateDebut;

    @XStreamAlias("fin")
    private Date dateFin;
    private String idAnneeSession;

    
    private Date dateDebutInscription;
    private Date dateFinInscription;
    private String description;
    private String coutSessionContinue;
    private String coutSessionPermanente;
    private Integer idResponsable;
    private Integer nbGroupes;
    @XStreamImplicit
    private List<Candidature> candidatures;

    public SessionDiplome() {
    }

    public SessionDiplome(Integer idSession) {
        this.idSession = idSession;
    }

    public SessionDiplome(Integer idSession, int nbGroupes) {
        this.idSession = idSession;
        this.nbGroupes = nbGroupes;
    }

    public Integer getIdSession() {
        return idSession;
    }

    public void setIdSession(Integer idSession) {
        this.idSession = idSession;
    }

    public Integer getIdVersionDiplome() {
        return idVersionDiplome;
    }

    public void setIdVersionDiplome(Integer idVersionDiplome) {
        this.idVersionDiplome = idVersionDiplome;
    }

    public String getIdFormation() {
        return idFormation;
    }

    public void setIdFormation(String idFormation) {
        this.idFormation = idFormation;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public Date getDateDebut() {
        return dateDebut;
    }

    public void setDateDebut(Date dateDebut) {
        this.dateDebut = dateDebut;
    }

    public Date getDateFin() {
        return dateFin;
    }

    public void setDateFin(Date dateFin) {
        this.dateFin = dateFin;
    }

    public String getIdAnneeSession() {
        return idAnneeSession;
    }

    public void setIdAnneeSession(String idAnneeSession) {
        this.idAnneeSession = idAnneeSession;
    }

    public Date getDateDebutInscription() {
        return dateDebutInscription;
    }

    public void setDateDebutInscription(Date dateDebutInscription) {
        this.dateDebutInscription = dateDebutInscription;
    }

    public Date getDateFinInscription() {
        return dateFinInscription;
    }

    public void setDateFinInscription(Date dateFinInscription) {
        this.dateFinInscription = dateFinInscription;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCoutSessionContinue() {
        return coutSessionContinue;
    }

    public void setCoutSessionContinue(String coutSessionContinue) {
        this.coutSessionContinue = coutSessionContinue;
    }

    public String getCoutSessionPermanente() {
        return coutSessionPermanente;
    }

    public void setCoutSessionPermanente(String coutSessionPermanente) {
        this.coutSessionPermanente = coutSessionPermanente;
    }

    public Integer getIdResponsable() {
        return idResponsable;
    }

    public void setIdResponsable(Integer idResponsable) {
        this.idResponsable = idResponsable;
    }

    public int getNbGroupes() {
        return nbGroupes;
    }

    public void setNbGroupes(int nbGroupes) {
        this.nbGroupes = nbGroupes;
    }



    public List<Candidature> getCandidatures() {
        return candidatures;
    }

    public void setCandidatures(List<Candidature> candidatures) {
        this.candidatures = candidatures;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idSession != null ? idSession.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SessionDiplome)) {
            return false;
        }
        SessionDiplome other = (SessionDiplome) object;
        if ((this.idSession == null && other.idSession != null) || (this.idSession != null && !this.idSession.equals(other.idSession))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "miage.rest.model.SessionDiplome[idSession=" + idSession + "]";
    }

}
